package org.white.word2pdf.enums;

import java.util.Locale;
import org.apache.commons.lang3.StringUtils;
import org.white.word2pdf.ErrorException;

public enum ComponentType {
    ASPOSE,DOC4J;


    public static ComponentType of(String type) {
        try {
            return ComponentType.valueOf(StringUtils.toRootUpperCase(type));
        } catch (IllegalArgumentException e) {
            throw new ErrorException("目前尚且不支持" + type + "，如果有需要您可以在github提交issue");
        }
    }
}
